home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Date & Calendars / showdate.izs < prev    next >
Text File  |  2005-09-27  |  7KB  |  333 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>ShowDate Function 
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>This script is a great example that shows the date in different formats from one function. This script can help people understand the js script so is good for newbies!<!/DESCRIPTION> 
  7.  
  8. <!CATEGORY>calenders<!/CATEGORY>
  9.  
  10. <!SCRIPT>
  11. <!-- START OF SCRIPT -->
  12.  
  13. <!-- HOW TO INSTALL SHOWDATE FUNCTION:
  14.  
  15.  
  16.  
  17.   1.  Copy the coding into the BODY of your HTML document  -->
  18.  
  19.  
  20.  
  21. <!-- STEP ONE: Paste this code into the BODY of your HTML document  -->
  22.  
  23.  
  24.  
  25. <BODY>
  26.  
  27.  
  28. <!-- Original:  Demetrius Francis  (dem_@hotmail.com) -->
  29.  
  30. <!-- Web Site:  http://www.angelfire.com/de/draf/ -->
  31.  
  32. <script LANGUAGE="javascript" type="text/javascript" src="showdate.js"></script>
  33.  
  34. <table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
  35.  
  36.   <tr>
  37.  
  38.     <td style="font-family:verdana; font-size:10px; background-color:#ffcc33; padding:0x; height:20px; border-bottom:#eee 5px solid">
  39.  
  40.         <div align="left" id="banner" style="padding:2px">Javascript Function :: <b>Showdate()</b></div>
  41.  
  42.         <p style="padding-left:15px; background-color:#eee;">
  43.  
  44.             Syntax: 
  45.  
  46.             <br><br>    
  47.  
  48.             <b>Showdate</b> ( [date object|string], [day string], [month string], [date string], [year string], [delimeter string] )
  49.  
  50.             <br>
  51.  
  52.             <br>
  53.  
  54.             <i>Date</i>:- Javascript date object in the form <i>new Date(), new Date(1982,06,30)</i>.
  55.  
  56.             <br>
  57.  
  58.             <br>
  59.  
  60.             <i>Day</i>:- Day string in the form <i>"dddd" or "ddd"</i>.
  61.  
  62.             <br>
  63.  
  64.             <br>
  65.  
  66.             <i>Month</i>:- Month string in the form <i>"mmmm", "mmm", "mm"</i>.
  67.  
  68.             <br>
  69.  
  70.             <br>
  71.  
  72.             <i>Date</i>:- Date string in the form <i>"dddd", "ddd", "dd", "d"</i>.
  73.  
  74.             <br>
  75.  
  76.             <br>
  77.  
  78.             <i>Year</i>:- Year string in the form <i>"yyyy", "yy"</i>.
  79.  
  80.         </p>
  81.  
  82.     </td>
  83.  
  84.   </tr>
  85.  
  86. </table>
  87.  
  88.  
  89.  
  90. <br>
  91.  
  92. <table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
  93.  
  94.   <tr>
  95.  
  96.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">
  97.  
  98.         Example
  99.  
  100.     </td>    
  101.  
  102.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">
  103.  
  104.         Results
  105.  
  106.  
  107.  
  108.     </td>    
  109.  
  110.  </tr>
  111.  
  112.  
  113.  
  114.  
  115.  
  116.   <tr>
  117.  
  118.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(), 'dddd', 'mmm', 'dd', 'yyyy', '-')</td>    
  119.  
  120.  
  121.  
  122.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">
  123.  
  124.         <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(), 'dddd', 'mmmm', 'dd', 'yyyy', '-'))</script>
  125.  
  126.     </td>    
  127.  
  128.  </tr>
  129.  
  130.  
  131.  
  132.  
  133.  
  134.   <tr>
  135.  
  136.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(), 'dd', 'mm', 'dd', 'yyyy', '.')</td>    
  137.  
  138.  
  139.  
  140.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">
  141.  
  142.         <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(), 'dd', 'mm', 'dd', 'yyyy', '.'))    </script>
  143.  
  144.     </td>    
  145.  
  146.  </tr>
  147.  
  148.  
  149.  
  150.  
  151.  
  152.   <tr>
  153.  
  154.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(2001,11,25), 'dddd', 'mmm', 'dd', 'yy', ' ')</td>    
  155.  
  156.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">        <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(2001,11,25), 'dddd', 'mmm', 'dd', 'yy', ' '))</script></td>    
  157.  
  158.  </tr>
  159.  
  160. </table>
  161.  
  162. <p>
  163.  
  164. <a href="showdate.js">Download showdate.js</a>
  165.  
  166.  
  167. <!-- END OF SCRIPT -->
  168. <!/SCRIPT>
  169.  
  170. <!PREVIEW>
  171. <!-- START OF SCRIPT -->
  172.  
  173.  
  174. <!-- HOW TO INSTALL SHOWDATE FUNCTION:
  175.  
  176.  
  177.  
  178.   1.  Copy the coding into the BODY of your HTML document  -->
  179.  
  180.  
  181.  
  182. <!-- STEP ONE: Paste this code into the BODY of your HTML document  -->
  183.  
  184.  
  185.  
  186. <BODY>
  187.  
  188.  
  189. <!-- Original:  Demetrius Francis  (dem_@hotmail.com) -->
  190.  
  191. <!-- Web Site:  http://www.angelfire.com/de/draf/ -->
  192.  
  193. <script LANGUAGE="javascript" type="text/javascript" src="showdate.js"></script>
  194.  
  195. <table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
  196.  
  197.   <tr>
  198.  
  199.     <td style="font-family:verdana; font-size:10px; background-color:#ffcc33; padding:0x; height:20px; border-bottom:#eee 5px solid">
  200.  
  201.         <div align="left" id="banner" style="padding:2px">Javascript Function :: <b>Showdate()</b></div>
  202.  
  203.         <p style="padding-left:15px; background-color:#eee;">
  204.  
  205.             Syntax: 
  206.  
  207.             <br><br>    
  208.  
  209.             <b>Showdate</b> ( [date object|string], [day string], [month string], [date string], [year string], [delimeter string] )
  210.  
  211.             <br>
  212.  
  213.             <br>
  214.  
  215.             <i>Date</i>:- Javascript date object in the form <i>new Date(), new Date(1982,06,30)</i>.
  216.  
  217.             <br>
  218.  
  219.             <br>
  220.  
  221.             <i>Day</i>:- Day string in the form <i>"dddd" or "ddd"</i>.
  222.  
  223.             <br>
  224.  
  225.             <br>
  226.  
  227.             <i>Month</i>:- Month string in the form <i>"mmmm", "mmm", "mm"</i>.
  228.  
  229.             <br>
  230.  
  231.             <br>
  232.  
  233.             <i>Date</i>:- Date string in the form <i>"dddd", "ddd", "dd", "d"</i>.
  234.  
  235.             <br>
  236.  
  237.             <br>
  238.  
  239.             <i>Year</i>:- Year string in the form <i>"yyyy", "yy"</i>.
  240.  
  241.         </p>
  242.  
  243.     </td>
  244.  
  245.   </tr>
  246.  
  247. </table>
  248.  
  249.  
  250.  
  251. <br>
  252.  
  253. <table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
  254.  
  255.   <tr>
  256.  
  257.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">
  258.  
  259.         Example
  260.  
  261.     </td>    
  262.  
  263.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">
  264.  
  265.         Results
  266.  
  267.  
  268.  
  269.     </td>    
  270.  
  271.  </tr>
  272.  
  273.  
  274.  
  275.  
  276.  
  277.   <tr>
  278.  
  279.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(), 'dddd', 'mmm', 'dd', 'yyyy', '-')</td>    
  280.  
  281.  
  282.  
  283.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">
  284.  
  285.         <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(), 'dddd', 'mmmm', 'dd', 'yyyy', '-'))</script>
  286.  
  287.     </td>    
  288.  
  289.  </tr>
  290.  
  291.  
  292.  
  293.  
  294.  
  295.   <tr>
  296.  
  297.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(), 'dd', 'mm', 'dd', 'yyyy', '.')</td>    
  298.  
  299.  
  300.  
  301.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">
  302.  
  303.         <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(), 'dd', 'mm', 'dd', 'yyyy', '.'))    </script>
  304.  
  305.     </td>    
  306.  
  307.  </tr>
  308.  
  309.  
  310.  
  311.  
  312.  
  313.   <tr>
  314.  
  315.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x;">Showdate(new Date(2001,11,25), 'dddd', 'mmm', 'dd', 'yy', ' ')</td>    
  316.  
  317.     <td style="font-family:verdana; font-size:10px; background-color:#eee; padding:0x; height:20px; border-bottom:#eee 5px solid">        <script LANGUAGE="javascript" type="text/javascript"> document.write(Showdate(new Date(2001,11,25), 'dddd', 'mmm', 'dd', 'yy', ' '))</script></td>    
  318.  
  319.  </tr>
  320.  
  321. </table>
  322.  
  323. <p>
  324.  
  325. <a href="showdate.js">Download showdate.js</a>
  326.  
  327.  
  328.  
  329.  
  330. <!-- END OF SCRIPT -->
  331. <!/PREVIEW>
  332.  
  333. <!RELATED>NONE<!/RELATED>